package org.mattmckay.PDFd.Layer;


import com.jayway.android.robotium.solo.Solo;

import PDFd.HomeActivity;
import PDFd.loading.LoadingScreen;
import android.test.ActivityInstrumentationTestCase2;

public class UITest extends ActivityInstrumentationTestCase2<LoadingScreen> {
	private Solo solo;
	public UITest() {
		super("org.mattmckay.PDFd.loading.LoadingScreen", LoadingScreen.class);
	}
	public UITest(Class<LoadingScreen> activityClass) {
		super(activityClass);
	}

	public void setUp() throws Exception {
		solo = new Solo(getInstrumentation(), getActivity());
	}
	public void testEverything() {
		solo.clickOnButton("Edit existing PDF");
		solo.clickOnText("0 :");
		solo.clickOnButton("Home");
		//When we click home, we need to wait in order to allow the persistance engine to stop.
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
		}
	}

}